<?php

class Eleven_Validate_TopicValidate extends Zend_Validate_Abstract
{
    const NOT_EXIST = 'notExist';

    protected $_messageTemplates = array(
        self::NOT_EXIST => '分类不存在，请重新选择！'
    );

    public function isValid($value, $context = null)
    {
        $value = (string) $value;
        $this->_setValue($value);
		
        if ($value != '0') 
        {
            return true;
        }
        
        $this->_error(self::NOT_EXIST);
        return false;
    }
}
